﻿using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace GreenXi.Model
{
    /// <summary>
    /// 用户角色关联表
    /// </summary>
    [Table("UserRoleRelation")]
    public class UserRoleRelation
    {
        /// <summary>
        /// 主键，自动递增
        /// </summary>
        [Key]
        [Column("ID")]
        public int ID { get; set; }

        /// <summary>
        /// 关联用户表的键
        /// </summary>
        [Column("UserId")]
        public int UserId { get; set; }

        /// <summary>
        /// 关联角色表的主键
        /// </summary>
        [Column("RoleId")]
        public int RoleId { get; set; }

        /// <summary>
        /// 创建时间，系统自动填充
        /// </summary>
        [Column("CreatedTime")]
        public DateTime CreatedTime { get; set; }

        /// <summary>
        /// 修改时间
        /// </summary>
        [Column("ModifiedTime")]
        public DateTime? ModifiedTime { get; set; }

    }
}
